<?php

/*
 * This file is part of the gedongdong/laravel_rbac_permission.
 *
 * (c) gedongdong <gedongdong2010@163.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        //
    ];

    /**
     * Define the application's command schedule.
     *
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
     */
    protected function schedule(Schedule $schedule)
    {

        $schedule->command('TaskStatus 1')->dailyAt('23:59'); //结束今日次日单
        $schedule->command('TaskStatus 2')->dailyAt('08:30'); //开始次日单
        $schedule->command('TaskStatus 3')->dailyAt('17:30'); //开始过夜单
        $schedule->command('TaskStatus 4')->dailyAt('23:00'); //结束过夜单
        $schedule->command('TaskStatus 5')->dailyAt('01:00'); //未完成罚款

        $schedule->command('getGoodsDetial')->dailyAt('15:00'); //更新销量数据

        //$schedule->command('syncTaokeyi')->everyFiveMinutes();     //每五分钟运行一次任务
        $schedule->command('syncTaokeyiNew')->everyFiveMinutes();  //每五分钟运行一次任务
        $schedule->command('TheUrgentOrderStatus')->everyMinute(); //每分钟运行
    }

    /**
     * Register the commands for the application.
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
